package com.gaojiawei.multiThread01_ThreadCreateMethod;

/**
 * 创建线程方法1：继承Thread类重写run方法
 */
public class l2_ThreadCreateMethod1 {
    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        myThread.start();
        for(int i = 0;i<100;i++){
            System.out.println("MainThread:"+i);
        }
    }
}

class MyThread extends Thread{
    @Override
    public void run() {
        for(int i = 0;i<100;i++){
            System.out.println("Mythread:"+i);
        }
    }
}
